package com.zrrd.javaSEPlus._04_reflect;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo01
 * @description
 * @create 2023/11/12 14:54
 */
public class Demo01 {
    public static void main(String[] args) {
        Person person = Person.personLoader();
        Person person1 = Person.personLoader();
        System.out.println(person==person1);

    }
}

class Person{
    private static Person p=new Person();
    //私有化了自己的构造方法
    private Person(){

    }
    public static Person personLoader(){
        return p;
    }
}
